/** Prototype class ----------------------------------------------**/
/** Define a class which can be cloned. Need to define the virtual
function clone.
**/

#ifndef PROTOTYPE_BASE_H_
#define PROTOTYPE_BASE_H_

#include <boost/shared_ptr.hpp>
#include <iostream>
#include "Logger.h"

namespace BPL
{
template <class T> class Prototype
{
 public:
    virtual ~Prototype() {}
    virtual boost::shared_ptr<T> clone() const = 0;
};

struct protoTest : public Prototype<protoTest>
{
     boost::shared_ptr<protoTest> clone() const
     {
         return boost::shared_ptr<protoTest>(new protoTest(*this));
     }

     ~protoTest()
     {
         Logger::log("protoTest delete");
     }
};
}
#endif
